package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import org.springframework.data.domain.Pageable;
import com.starlink.model.domain.MallPeripheryDetailDO;
import com.starlink.model.request.MallPeripheryDetailRequest;
import com.starlink.model.vo.MallPeripheryDetailVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface MallPeripheryDetailService extends IService<MallPeripheryDetailDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    MallPeripheryDetailVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<MallPeripheryDetailVO> pageQuery(Pageable pageable,MallPeripheryDetailRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<MallPeripheryDetailVO> listQuery(MallPeripheryDetailRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(MallPeripheryDetailRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(MallPeripheryDetailRequest request);
    /**
     * 根据主键删除
     * @param ids
     * @return
     */
    Boolean deleteDOByIds(String ids);

    /**
     * 根据周边商品ID更新详情
     * @param peripheryInfo
     * @param id
     */
    void updateByPerId(String peripheryInfo, Long id);

    void deletedByPerIds(String ids);
}
